package.path = ";..\\?.lua" .. package.path

require 'typedef'
require 'table'

os.execute("mkdir output")

use_cpp_types()

file_tag = ""
file_tags = {"Login", "Player", "Scene"}
messages_all = {}


for _, tag in ipairs(file_tags) do
	file_tag = tag

	bind("template/template_msg_network.h", "protocols/"..tag..".lua", "output/Msg"..tag..".h")

	table.insert(messages_all, messages)
end

messages = nil


bind("template/template_msg_factory.h", "", "output/MsgFactoryNetwork.h")
bind("template/template_msg_factory.cpp", "", "output/MsgFactoryNetwork.cpp")

